#{extends 'main.html' /}
<br/>
<table border="1">
<tr>
<th>Task</th>
<th>Type</th>
<th>Status</th>
<th>Priority</th>
<th>Creator</th>

<th> Accept</th>
<th> Reject </th>

</tr>

#{list items:tasks, as:'suggestedTasks'}
<tr>
	<td><a href="@{Tasks.showTask(suggestedTasks.getEntityId())}">${suggestedTasks.description}</a></td>
	<td>#{if suggestedTasks.type!=null}${suggestedTasks.type.type}#{/if}</td>
	<td>#{if suggestedTasks.status!=null}${suggestedTasks.status.status}#{/if}</td>
	<td>#{if suggestedTasks.priority!=null}${suggestedTasks.priority}#{/if}</td>
	<td>#{if suggestedTasks.creator!=null}${suggestedTasks.creator.firstName} ${suggestedTasks.creator.lastName}#{/if}</td>
	
	<td> <a href="@{Tasks.acceptSuggestedTask(suggestedTasks.getEntityId())}"> Accept</a>	</td> 
	<td> <a href="@{Tasks.rejectSuggestedTask(suggestedTasks.getEntityId())}"> Reject</a> </td>
	</tr>
#{/list}
</table> 